server {
	listen   80;
	listen   [::]:80;

	root /var/www;
	index index.php index.html index.htm;
	server_name localhost;

	location / {
		try_files $uri $uri/ /index.html;
	}
    location ~ [^/]\.php(/|$) {
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;
            if (!-f $document_root$fastcgi_script_name) {
                    return 404;
            }
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
			fastcgi_param REMOTE_USER $remote_user;
            auth_basic "Off";
            #auth_basic_user_file /usr/local/.htpasswd;
            }
	location ~ /\.ht {
		deny all;
	}
}
